/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.inria.openmath.omapi;

/**
 *
 * @author Mr.Sam
 */
public class BigInt {

    private String digits;

    private int base;

    private boolean positive;

    public BigInt () {}

    public BigInt (String digits) {
        this(digits, 1, 10);
    }

    public BigInt (String digits, int sign) {
        this(digits, sign, 10);
    }

    public BigInt (String digits, int sign, int base) {
        this.digits = digits;
        this.positive = (sign >= 0) ? true : false;
        this.base = base;
    }

    public String toString() {
        return ((positive) ? "" : "-") + digits + "(" + base + ")";
    }

    /**
     * Returns the string of digits of the big-int.
     *
     * @return the digits of the big-int.
     */
    public String getDigits() {
        return digits;
    }

    /**
     * Returns the sign of the big-int.
     *
     * @return the sign of the big-int.
     */
    public int getSign() {
        return (positive) ? 1 : -1;
    }

    /**
     * Returns the base used for digits of the big-int.
     *
     * @return the base of the big-int.
     */
    public int getBase() {
        return base;
    }


}
